import cv2

def main():
    img = cv2.imread('10/3.png')

    blur = cv2.bilateralFilter(img, 20, 100, 100)

    edges = cv2.Canny(blur, 50, 150)

    Laplacian = cv2.Laplacian(src=blur, ddepth=cv2.CV_64F, ksize=5)
    Laplacian = cv2.convertScaleAbs(Laplacian)

    ScharrX = cv2.Scharr(blur, cv2.CV_64F, 1, 0)
    ScharrY = cv2.Scharr(blur, cv2.CV_64F, 0, 1)
    ScharrX = cv2.convertScaleAbs(ScharrX)
    ScharrY = cv2.convertScaleAbs(ScharrY)
    Scharr = ScharrX + ScharrY
    # Scharr = cv2.addWeighted(ScharrX, 0.8, ScharrY, 0.2, 4)

    SobleX = cv2.Sobel(blur, cv2.CV_64F, 1, 0)
    SobleY = cv2.Sobel(blur, cv2.CV_64F, 0, 1)
    SobleX = cv2.convertScaleAbs(SobleX)
    SobleY = cv2.convertScaleAbs(SobleY)
    # Soble = SobleX + SobleY
    Soble = cv2.addWeighted(ScharrX, 0.8, ScharrY, 0.5, 0)
    
    dst = cv2.addWeighted(blur, 0.8, Scharr, 0.8, 0)
    
    dst = cv2.bilateralFilter(dst, 20, 100, 100)

    cv2.imshow('Original', img)
    cv2.imshow('blur', blur)
    cv2.imshow('Laplacian', Laplacian)
    cv2.imshow('Scharr', Scharr)
    cv2.imshow('Soble', Soble)
    cv2.imshow('dst', dst)

    cv2.waitKey(0)
    cv2.destroyAllWindows()

if __name__ == '__main__':
    main()